<!doctype html>
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    <title>Remote Shell</title>
    <link rel="stylesheet" href="../css/xterm2.css" />
    <link rel="stylesheet" href="../js/bootstrap/bootstrap.min.css"/>
    <link rel="stylesheet" href="../iconfont/iconfont.css">
    <!-- 图标库： https://icons.bootcss.com/ -->
    <link rel="stylesheet" href="../font/bootstrap-icons.css">
    <style>
        body{position: relative;background-color: #000;}
        html{height: 100%;}
        /* 自定义样式 */
        .folder:hover {
            background-color: #007bff; /* Bootstrap 主题色 */
            color: white;
            cursor: pointer; /* 鼠标变成手型 */
        }
        #fileList {
            background-color: white;
            height: calc(100vh - 40px); /* 设置最大高度 */
            overflow-y: auto; /* 设置垂直滚动条 */
        }
        .list-group-item {padding: 0rem 0.25rem;}
        .bi-download:hover{cursor: pointer;}
        .bi-folder-fill{color:#ffb233}
        .bi-file-earmark-fill{color:#666666}
        /* 整个滚动条 */
        ::-webkit-scrollbar {width : 7px;}
        /*!* 滚动条里面滑块 *!*/
        ::-webkit-scrollbar-thumb {border-radius: 7px;background: #818181;}
        /*!*滚动条里面轨道*!*/
        ::-webkit-scrollbar-track {border-radius: 7px;box-shadow: inset 0 0 1px rgba(0, 0, 0, 0.2);background: white;}
    </style>
</head>
<body><!-- 对话框 -->
<!-- 使用自带的aria-labelledby事件按钮会冲突 -->
<div>
    <div class="input-group">
        <input type="text" class="form-control" id="currentPath" placeholder="Current Directory" onkeypress="handleKeyPress(event)">
        <input type="file" class="form-control-file" style="display: none" onchange="uploadFile()">
        <div class="input-group-append">
            <button type="button" class="btn btn-primary" onclick="reload()" title="刷新文件"><span class="iconfont icon-shuaxin"></span></button>
            <button type="button" class="btn btn-primary" onclick="triggerFile()" title="上传文件"><span class="iconfont icon-yunshangchuan"></span></button>
        </div>
    </div>
    <ul id="fileList" class="list-group">
        <!-- 文件列表将通过 jQuery 动态渲染 -->
    </ul>
</div>
<!-- 对话框 -->
<div class="modal fade" id="load" tabindex="-1" data-backdrop="static" data-keyboard="false" aria-hidden="true">
    <div class="modal-dialog modal-xl modal-dialog-centered">
        <div class="modal-content">
            <div class="text-center">
                <!-- 进度条 -->
                <div><span class="navbar-brand mb-0 h1" id="uploadMessage" >上传中...</span></div>
                <div id="progressBar" class="progress-bar" role="progressbar" style="width: 0%;" aria-valuenow="0" aria-valuemin="0" aria-valuemax="100">0%</div>
            </div>
        </div>
    </div>
</div>
<script src="../js/common.js"></script>
<script src="../js/jquery-3.4.1.min.js"></script>
<script src="../js/bootstrap/popper.min.js" charset="utf-8"></script>
<script src="../js/bootstrap/bootstrap.min.js" charset="utf-8"></script>
<script src="../js/websocket.js" charset="utf-8"></script>
<script src="../js/sftp.js" charset="utf-8"></script>
</body>
</html>